#include <iostream> //  Score.cpp
#include <string>
#include "Score.h"

using namespace std;

void Score::Write()
{
    cout<<"please input the name: ";
    cin>>name;
    cout<<"please input the ID number: ";
    cin>>id;
    cout<<"please input the Math score: ";
    cin>>math;
    cout<<"please input the Physics score: ";
    cin>>phy;
    cout<<"please input the Data Structure score: ";
    cin>>data;
    cout<<endl;
}

void Score::Display()
{
    cout<<"name: "<<name<<"   "<<"ID: "<<id<<endl;
    cout<<"the student\'s score result:"<<endl;
    cout<<"Math: "<<math<<endl;
    cout<<"Physics: "<<phy<<endl;
    cout<<"Data Structure: "<<data<<endl;
    cout<<"Average: "<<ave<<endl<<endl;
}

void Score::Average()
{
    ave = (math + phy + data) / 3.0;
}
